#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    double a;
    cin>>a;
    int b=(int)a;
    cout<<b%10;
    return 0;
}
